﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using QxFramework.Core;
using UnityEngine.UI;

public class NextButton : MonoBehaviour
{
    // Start is called before the first frame update
    private void Awake()
    {
        this.GetComponent<Button>().onClick.SetListener(() =>
        {
            UIManager.Instance.Open("DialogWindowUI", 5, args: new DialogWindowUI.DialogWindowUIArg
      ("注意", "确定要离开当前关卡吗?\n场景中未拾取道具将会被销毁", null, "确定", "取消", () => {
          MessageManager.Instance.Get<GameControl.GameAction>().DispatchMessage(GameControl.GameAction.EndCurrentLevel, this, null);
      }));

        });
    }
}
